package com.itheima.health.service;

import com.itheima.health.exception.DuplicateOperateException;
import com.itheima.health.pojo.Member;
import com.itheima.health.pojo.Order;

import java.util.List;


public interface MemberService {
    /**
     * 会员添加
     * @param member
     * @return
     * @throws DuplicateOperateException 重复操作（手机号已存在）
     */

    Member add(Member member)throws DuplicateOperateException;

    /**
     * 根据手机号查询
     * @param phoneNumber
     * @return
     */
    Member findByPhoneNumber(String phoneNumber);

    /**
     * 根据id查询
     * @param id
     * @return
     */
    Member findById(Integer id);

    List<Integer> countByMonth(List<String> months);
}
